Skip to content

Conversation

@kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented Feb 17, 2025

TOOL-3443


PR-Codex overview

This PR focuses on enhancing the handling of salt values for deterministic contract deployments in the thirdweb package, ensuring that salt values are validated as hex strings and updating related functions and tests.

Detailed summary

  • Updated handling of salt in multiple files to validate if it's a hex string of length 66.
  • Modified computeDeploymentAddress, getInitBytecodeWithSalt, and zkDeployContractDeterministic to use the new salt logic.
  • Added tests to ensure computed addresses match deployed addresses for deterministic deployments.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@kumaryash90 kumaryash90 requested review from a team as code owners February 17, 2025 15:03
@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2025

🦋 Changeset detected

Latest commit: 22a95a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/wagmi-adapter Patch
thirdweb-login Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 5:07pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 5:07pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 5:07pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 5:07pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 17, 2025 5:07pm

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Feb 17, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 17, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.3 KB (0%) 926 ms (0%) 533 ms (+31% 🔺) 1.5 s
thirdweb (cjs) 121.89 KB (0%) 2.5 s (0%) 1.2 s (-12.05% 🔽) 3.7 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 62 ms (+11.21% 🔺) 174 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 25 ms (+96.14% 🔺) 35 ms
thirdweb/react (minimal + tree-shaking) 19.29 KB (0%) 386 ms (0%) 76 ms (-24.74% 🔽) 462 ms

@codecov
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 9 lines in your changes missing coverage. Please review.

Project coverage is 56.85%. Comparing base (942d20a) to head (22a95a0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ontract/deployment/zksync/zkDeployDeterministic.ts 16.66% 5 Missing ⚠️
...c/utils/any-evm/zksync/computeDeploymentAddress.ts 33.33% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (57.14%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6274      +/-   ##
==========================================
+ Coverage   56.84%   56.85%   +0.01%     
==========================================
  Files        1168     1168              
  Lines       64662    64677      +15     
  Branches     5235     5246      +11     
==========================================
+ Hits        36755    36772      +17     
+ Misses      27179    27177       -2     
  Partials      728      728              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 8286840
packages 55.06% <57.14%> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...eb/src/utils/any-evm/compute-deployment-address.ts 100.00% <100.00%> (ø)
.../any-evm/compute-published-contract-deploy-info.ts 100.00% <100.00%> (ø)
...b/src/utils/any-evm/get-init-bytecode-with-salt.ts 91.30% <100.00%> (+0.82%) ⬆️
...c/utils/any-evm/zksync/computeDeploymentAddress.ts 77.77% <33.33%> (-14.53%) ⬇️
...ontract/deployment/zksync/zkDeployDeterministic.ts 52.80% <16.66%> (-2.49%) ⬇️

... and 3 files with indirect coverage changes

@joaquim-verges joaquim-verges merged commit b182302 into main Feb 17, 2025
32 of 33 checks passed
@joaquim-verges joaquim-verges deleted the yash/bytes32-salt-for-deterministic-deployment branch February 17, 2025 21:50
@joaquim-verges joaquim-verges mentioned this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants